package highlighter.ast.impl;

import highlighter.ast.IASTNode;
import highlighter.visitor.IASTVisitor;

public class Factor implements IASTNode{
	
	private Factor factor;
	private int operation;
	private Term term;

	public Factor(Term term) {
		this.term = term;
	}

	public Factor(Factor lhs, int operation, Term term) {
		this.factor = lhs;
		this.operation = operation;
		this.term = term;
	}

	public Factor getFactor() {
		return factor;
	}

	public int getOperation() {
		return operation;
	}

	public Term getTerm() {
		return term;
	}

	@Override
	public Object accept(IASTVisitor visitor) {
		return visitor.visit(this);
	}

	

}
